package com.yswy.common.wxOrder.V2.wxconfig;

import com.github.wxpay.sdk.WXPayConfig;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * @Author white
 * @Description:
 * @date Create in 18:36 2021/5/6
 * @Modified By:
 */
public class WXPayConf implements WXPayConfig {

    private byte[] certData;
    private String appID;
    private String mchID;
    private String key;

    public void setAppID(String appID) {
        this.appID = appID;
    }

    public void setMchID(String mchID) {
        this.mchID = mchID;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Override
    public String getAppID() {
        return appID;
    }

    @Override
    public String getMchID() {
        return mchID;
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public InputStream getCertStream() {
        ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
        return certBis;

    }

    @Override
    public int getHttpConnectTimeoutMs() {
        return 30000;
    }

    @Override
    public int getHttpReadTimeoutMs() {
        return 30000;
    }
}
